<?php

require_once '../../config.php';


if(empty($_GET['num1'])){
    exit('缺少对象');
}
if(empty($_GET['id'])){
    exit('缺少对象');
}

$num1 = $_GET['num1'];
$id = $_GET['id'];

$conn = mysqli_connect(XIU_DB_HOST,XIU_DB_USER,XIU_DB_PASS,XIU_DB_NAME);
if(!$conn){
    exit('连接失败');
}

$res = mysqli_query($conn,"update sentence set number = {$num1} where id = {$id} limit 1");

if(!$res){
    exit('查询失败');
}
$row = mysqli_fetch_assoc($res);

echo $row['avatar']

?>